package com.xzh.dao;

import com.xzh.model.Appointment;
import com.xzh.model.search.AppointmentDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AppointmentAMapper {
    List<AppointmentDao> selectList();

    List<AppointmentDao> selectListByPage(@Param("offset") int offset, @Param("limit") int limit);

    //支持条件查询的分页方法
    List<AppointmentDao> selectListByCondition(@Param("appointment") AppointmentDao appointment,
                                               @Param("offset") int offset,
                                               @Param("size") int size);

    int selectCount();

    int selectCountByCondition(@Param("appointment") AppointmentDao appointment);

    Integer selectId(@Param("studentId") int studentId, @Param("scheduleId") int scheduleId);

    int selectCourseId(int scheduleId);

    boolean insert(Appointment appointment);

    boolean update(AppointmentDao appointmentDao);

    boolean updateCourseId(AppointmentDao appointmentDao);

    boolean complete(Integer id);

    boolean confirm(Integer id);

    boolean cancel(Integer id);

    boolean reorder(Integer id);
}
